public class zheban{
	public static void main(String[] args){
		int a[] = {8,19,26,49,52,66,97};
		System.out.println(find(a,97));
		}
	public static int find(int[]a,int n){	
		int low = 0;
		int high = a.length-1;
		int c = 66;
		int middle=(low+high)/2;
		while(middle>=0){
			if (c < a[middle]){
				high = middle-1;
			}
			if (c > a[middle]){
				low = middle+1;
			}
			else if(c==middle){
				return middle;
			}
			middle=(low+high)/2;
		}
		return -1;
	}
}